package lex.dm.utils;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

import org.lex.utils.SystemProperties;


public class Prefs {
	public static final String BREAST_CANCER_WISCONSIN_TABLE = "breast_cancer_wisconsin";
	public static final String WDBC_TABLE = "wdbc";
	public static final String WPBC_TABLE = "wpbc";
	private static final String DB_PATH = "data/db/";
	private static final String DB_NAME = "data";
	private static final String breast_cancer_wisconsin_file = "data/bin/breast-cancer-wisconsin.data";
	private static final String wdbc_file = "data/bin/wdbc.data";
	private static final String wpbc_file = "data/bin/wpbc.data";

	public static final File getDatabaseDirectory() {
		File dir = new File(SystemProperties.userDir());
		return new File(dir, DB_PATH);
	}

	public static final String getCatalogName() {
		return DB_NAME;
	}

	public static File getWisconsinBreastCancerFile() {
		File file = new File(SystemProperties.userDir());
		return new File(file, breast_cancer_wisconsin_file);
	}

	public static File getWDBCFile() {
		File file = new File(SystemProperties.userDir());
		return new File(file, wdbc_file);
	}

	public static File getWPBCFile() {
		File file = new File(SystemProperties.userDir());
		return new File(file, wpbc_file);
	}

	public static InputStream openWisconsinBreastCancerInputStream() throws FileNotFoundException {
		File file = new File(SystemProperties.userDir());
		file = new File(file, breast_cancer_wisconsin_file);
		return new FileInputStream(file);
	}
}
